import Datastore from 'nedb'
import path from 'path'
import { remote } from 'electron'

// C:\Users\yangheng\AppData\Roaming\Electron\db

export default {
  user_login: new Datastore({// 客服登录状态
    autoload: true,
    filename: path.join(remote.app.getPath('userData'), 'db/user_login.db')
  }),
  msg_list: new Datastore({// 聊天记录
    autoload: true,
    filename: path.join(remote.app.getPath('userData'), 'db/msg_list.db')
  }),
  user_list: new Datastore({// 登录过的客服信息
    autoload: true,
    filename: path.join(remote.app.getPath('userData'), 'db/user_list.db')
  })
}
